const BASE_URL = 'http://81.68.232.29:8000' //服务器地址
// const BASE_URL='http://127.0.0.1:8000' //django测试本地服务器
export const myRequest = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: BASE_URL + options.url,
			method: options.method || 'POST',
			contentType: 'application/json;charset=utf-8',
			header: {
				
			},
			data: options.data || {},
			success: (res) => {

				resolve(res);
			},
			// 如果接口调用失败
			fail: (err) => {

				reject(err);
			}
		})
	})
}
